#! /usr/bin/env python

# -*- coding: UTF-8 -*-
# ==============================================================================
# Filename : ReferNotes.py
# Purpose  :
# Author   : Yohann Li (lyh001686@sina.com)
# Date     : 2020-09-09 15:09
# ==============================================================================
import sys

from PyQt5.QtWidgets import QApplication, QTextBrowser

from conf.configuration import ReferNotes


class ReferenceNotes(QTextBrowser):
    def __init__(self):
        super(ReferenceNotes, self).__init__()
        self._init_cont()
        self.resize(int(QApplication.desktop().screen().width()/2), int(QApplication.desktop().screen().height()*2/3))
        self.move(int((QApplication.desktop().screen().width() - self.width()) / 2),
                  int((QApplication.desktop().screen().height() - self.height()) / 3))
        self.show()

    def _init_cont(self):
        self.setHtml(ReferNotes)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    t = ReferenceNotes()
    t.show()
    sys.exit(app.exec_())
